package cn.wen.eeayjoke.ui;

import android.Manifest;
import android.os.Bundle;
import android.view.View;

import com.wen.web.WebManager;

import cn.wen.core.permission.XPermission;
import cn.wen.core.titlebar.DefTitleBar;
import cn.wen.core.ui.AppActivity;
import cn.wen.eeayjoke.R;

/**
 * WebViw测试--用的是腾讯X5内核
 */
public class WebTestActivity extends AppActivity {


    @Override
    public Object getContentLayout() {
        return R.layout.activity_web_test;
    }

    @Override
    protected void initData(Bundle savedInstanceState) {
        // X5要用到的权限，不过没影响。
        XPermission permission = new XPermission(this);
        permission.permissions(Manifest.permission.READ_PHONE_STATE);
        permission.request(null);
    }

    /**
     * 打开WebActivity
     */
    public void open(View view) {
        WebManager.getInstance().startWebActivity(this, "https://www.baidu.com");
    }


    @Override
    protected void initTitle(DefTitleBar titleBar) {
        titleBar.setTitle("WebViw测试");
    }


}
